import React, {Component} from 'react';
import { Table} from 'antd';

export default class StandardTable extends Component<any, any> {


   rowSelection = {
    onChange: this.props.selectionsChange
  };

  render() {
    const { tableData, rowKey, loading ,columns } = this.props;
    return (
      <Table
        key={loading}
        defaultExpandAllRows={true}
        rowSelection={this.rowSelection}
        dataSource={tableData}
        rowKey={rowKey || 'id' }
        loading={loading}
        pagination={false}
        columns={columns} />
    );
  }
}
